package com.readboottest.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

/**
 * @author simaduoduo
 * @date 2019/7/25 12:21
 * @desc 书签实体类
 */
@Data
public class Bookmark {

    private int id;                 //书签id
    private int userId;             //用户id
    private String name;            //书签名字
    private String bookName;        //书籍名字
    @NotBlank
    private String href;            //链接

    @Override
    public String toString() {
        return "Bookmark{" +
                "id=" + id +
                ", userId=" + userId +
                ", name='" + name + '\'' +
                ", bookName='" + bookName + '\'' +
                ", href='" + href + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href.trim();
    }
}
